import request from "@/config/utils/request";
import { loadingParams, pageLoadingParams } from "@/basa/utils/public";

// 列表查询
export function getList(data) {
  return request({
    url: "/apis/smp/smpequipment/listSmpEquipmentChangePage",
    method: "POST",
    data: { ...data, ...pageLoadingParams },
  });
}

// 协议框架的列表
export function listProtocolinfoPage(data) {
  return request({
    url: "/apis/smp/frameworkPlan/qrySupplyProtocolInfo",
    method: "POST",
    data,
  });
}

// 采购计划的列表
export function listPurplanPage(data) {
  return request({
    url: "/apis/smp/frameworkPlan/listEquipmentPurplanDetlPage",
    method: "POST",
    data,
  });
}

// 采购方案的列表
export function listPursckinfoPage(data) {
  return request({
    url: "/apis/smp/frameworkPlan/listEquipmentPursckinfoPage",
    method: "POST",
    data,
  });
}

// 设备合同变更-crud

// 变更新增详情
export function getSmpPcConcChangeById(data) {
  return request({
    url: "/apis/smp/smpequipment/getEquipmentChangeById",
    method: "POST",
    data: { ...data, ...loadingParams },
  });
}

// 变更编辑详情
export function getEquipmentChangeConcDetail(data) {
  return request({
    url: "/apis/smp/smpequipment/getEquipmentChangeConcDetail",
    method: "POST",
    data: { ...data, ...loadingParams },
  });
}

// 新增
export function saveSmpContractCreation(data) {
  return request({
    url: "/apis/smp/smpequipment/saveEquipmentChange",
    method: "POST",
    data: { ...data, ...loadingParams },
  });
}

// 编辑
export function editSmpContractCreation(data) {
  return request({
    url: "/apis/smp/smpequipment/editEquipmentChange",
    method: "POST",
    data: { ...data, ...loadingParams },
  });
}

// 撤回
export function revokeSmpPcConcChange(data) {
  return request({
    url: "/apis/smp/smpequipment/revokeEquipmentChange",
    method: "POST",
    data: { ...data, ...loadingParams, loadingMessage: "撤回中,请稍等..." },
  });
}

// 删除
export function removeSmpPcConcChange(data) {
  return request({
    url: "/apis/smp/smpequipment/removeEquipmentChange",
    method: "POST",
    data: { ...data, ...loadingParams, loadingMessage: "删除中,请稍等..." },
  });
}

// 供应链管理 - 物资 - 合同变更导出
export function changeExport(data) {
  return request({
    url: "/apis/smp/smppcconc/changeExport",
    method: "POST",
    data: { ...data, ...loadingParams, loadingMessage: "导出中,请稍等..." },
  });
}
